<?php

namespace app\api\validate;


use think\Validate;

class Mill Extends Validate{

    /**
     * 验证规则
     */
    protected $rule = [
        'pay_password' => 'require|number|length:6',
        'mill_id'   =>  'require',
        'my_mill_id'   =>  'require'
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'pay_password.require'  =>  '支付密码不能为空',
        'pay_password.length'   =>  '支付密码长度不正确',
        'pay_password.number'   =>  '支付密码只能是数字',
        'mill_id.require'       =>  '矿机id不能为空',
        'my_mill_id.require'    =>  '我的矿机id不能为空',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'buy_mill'  => ['pay_password','mill_id'],
        'mill_enable'   =>  ['my_mill_id'],
    ];
}